
function sys_xhr()
{
	var xhr = false;
	return this;
}
	sys_xhr.prototype.set=function()
	{
		this.xhr = false;

		// get an instance of the http request header: gecko
		if ( window.XMLHttpRequest )
		{
			this.xhr = new XMLHttpRequest();
		}
		// IE
		else if ( window.ActiveXObject )
		{
			try	{ this.xhr = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e)
			{
				try { this.xhr = new ActiveXObject('Microsoft.XMLHTTP'); } catch (e1)
				{
					this.xhr = null;
				}
			}
		}
		if ( !this.xhr )
		{
			return false;
		}
		return true;
	}


// Synchroneous JAvascript Xml
function sys_sjax()
{
	return this;
}
	sys_sjax.prototype.send=function(object)
	{
		var ajax = null;
		ajax = new sys_xhr();
		if ( !ajax.set() )
		{
			return false;
		}

		// invoke the ajax process
		ajax.xhr.open('GET', object.callback, false);
		ajax.xhr.send(null);
		return ajax.xhr.responseXML;
}

// Asynchroneous JAvascript Xml
function sys_ajax()
{
	return this;
}
	sys_ajax.prototype.send=function(object)
	{
		var ajax = null;
		ajax = new sys_xhr();
		if ( !ajax.set() )
		{
			return false;
		}

		// invoke the ajax process
		ajax.xhr.open('GET', object.callback, true);
		ajax.xhr.onreadystatechange=function()
		{
			if ( (ajax.xhr.readyState == 4) && (ajax.xhr.responseXML) )
			{
				object.process(ajax.xhr.responseXML);
			}
		}
		ajax.xhr.send(null);
		return true;
	}